<?php	
class StatisticsCommon
{	
	private $project;
	private $db_name;
	
	private function setProjectId($id=1)
	{		 
		$this->project = $id*1;
	}
	
	private function getProjectId()
	{
		return $this->project;
	}
	
	private function setDbName($db='statistics')
	{
		$this->db_name = $db;
	}
	
	private function getDbName()
	{
		return $this->db_name;
	}
		
	function __construct($project_id=1, $db='statistics')
	{
		$this->setProjectId($project_id);
		$this->setDbName($db);
	}
	
	
	function getHostData($obj_type_id, $obj_id, $host)
	{
		$statictics_manager = new StatisticsComoonManager();
		$statictics_manager->Init($this->getProjectId(),$this->getDbName());
		
		return $statictics_manager->getHostData($obj_type_id, $obj_id, $host);
	}
	
	function getObjectData($obj_type_id, $obj_id)
	{
		$statictics_manager = new StatisticsComoonManager();
		$statictics_manager->Init($this->getProjectId(),$this->getDbName());
		
		return $statictics_manager->getObjectData($obj_type_id, $obj_id);
	}

	function InsertNewData($obj_type_id, $obj_id)
	{
		$statictics_manager = new StatisticsComoonManager();
		$statictics_manager->Init($this->getProjectId(),$this->getDbName());

		$statictics_manager->InsertNewData($obj_type_id, $obj_id);
	}
	
}
?>